package com.study.scala.oop

class Teacher {

  var name: String = _;

  private var age: Int = _;

  private[this] val gender = "male"

  def this(name: String) {
    this;
    this.name = name;
  }

  def getAge = age;
  def setAge(age: Int) {
    this.age = age;
  }
  def sayHello() {
    println(this.name + "*******" + this.gender + "********" + this.age)
  }

}

object HelloOOP {
  def main(args: Array[String]): Unit = {

    val teacher = new Teacher("zhaosc");
    teacher.sayHello();
  }
}